package com.example.zjx8969.myapplication;

import android.app.Activity;
import android.graphics.Color;

import com.readystatesoftware.systembartint.SystemBarTintManager;

public class TintColorManager {
    private static TintColorManager tintColorManager;

    private TintColorManager() {

    }

    public static TintColorManager getInstance() {
        if (tintColorManager == null) {
            synchronized (TintColorManager.class) {
                if (tintColorManager == null) tintColorManager = new TintColorManager();
            }
        }
        return tintColorManager;
    }


    public void tint(Activity activity,int color) {
        SystemBarTintManager tintManager = new SystemBarTintManager(activity);
        // enable status bar tint
        tintManager.setStatusBarTintEnabled(true);

        tintManager.setStatusBarTintColor(color);
    }
}
